﻿using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;


namespace FUSE
{
    /// <summary>
    /// This is a game component that implements IUpdateable.
    /// </summary>
    public class VictoryScreen : GameScene
    {
        protected TextMenuComponent menu;
        private ImageComponent background;
        private Texture2D ship1;
        private Texture2D ship2;
        private Texture2D ship3;

        private SpriteFont smallFont;
        private SpriteFont largeFont;
        private SpriteFont scoreFont;

        public enum MenuSelection
        {
            Continue = 1,
            ReturnToTitle
        }

        public VictoryScreen(Game game)
            : base(game)
        {
            // TODO: Construct any child components here
        }

        protected override void LoadContent()
        {
            ship1 = Game.Content.Load<Texture2D>("NormalShipRoughSmall");
            ship2 = Game.Content.Load<Texture2D>("SpeedShipSmall");
            ship3 = Game.Content.Load<Texture2D>("armorShipSmallGood");

            background = new ImageComponent(Game, Game.Content.Load<Texture2D>(""), ImageComponent.DrawMode.Center);

            base.LoadContent();
        }

        /// <summary>
        /// Allows the game component to perform any initialization it needs to before starting
        /// to run.  This is where it can query for any required services and load content.
        /// </summary>
        public override void Initialize()
        {
            // TODO: Add your initialization code here
            string[] items = { "Continue", "Return to Title" };
            menu = new TextMenuComponent(Game, smallFont, largeFont);
            menu.SetMenuItems(items);
            Components.Add(menu);


            base.Initialize();
        }

        /// <summary>
        /// Allows the game component to update itself.
        /// </summary>
        /// <param name="gameTime">Provides a snapshot of timing values.</param>
        public override void Update(GameTime gameTime)
        {
            // TODO: Add your update code here
            readUserInput(gameTime);


            base.Update(gameTime);
        }

        private void readUserInput(GameTime gameTime)
        {

        }

        public override void Show()
        {
            this.Enabled = true;
            this.Visible = true;

            this.menu.Hide();

            base.Show();
        }

        public override void Hide()
        {
            this.Enabled = false;
            this.Visible = false;

            menu.Hide();

            base.Hide();
        }
    }
}
